package cn.hairui.blog.service;

import cn.hairui.blog.entity.Visitrecord;
import cn.hairui.blog.dao.VisitrecordMapper;
import cn.hairui.blog.service.VisitrecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author laoganbu
 * @since 2020-04-27
 */
@Service
public class VisitrecordServiceImpl extends ServiceImpl<VisitrecordMapper, Visitrecord> implements VisitrecordService {

    @Autowired
    private VisitrecordMapper visitrecordMapper;

    @Override
    public Visitrecord selectByVisitDateAndIpAddress(String currentDate, String ipAddress) {
        return visitrecordMapper.selectByVisitDateAndIpAddress(currentDate,ipAddress);
    }

    @Override
    public int count() {
        return visitrecordMapper.count();
    }

    @Override
    public int countByDate(String date) {
        return visitrecordMapper.countByDate(date);
    }
}
